#include <iostream>
using namespace std;
int main()
{
   int x;
   cin >> x;
   int cnt = 0;
   if(x%2 ==0)
   cnt++;
   if(x>2 && x<=12)
   cnt++;
   if(cnt == 2)
   cout << "1"<<" ";
   else
   cout << "0" <<" ";
   if(cnt >=1)
   cout << "1"<<" ";
   else
   cout << "0" << " ";
   if(cnt == 1)
   cout <<"1" <<" ";
   else
   cout << "0" << " ";
   if(cnt == 0)
   cout << "1";
   else
   cout << "0";
}

